<template>
	<div>
			<view class="goods_list">
				<!-- <button type="default" @click="getGoods()">click</button> -->
				<view class="goods_item" v-for="item in goods" :key="item.iid" >
					<a :href="item.link"><image :src="item.show.img" ></image></a>
					
					<view class="price">
						<text>￥{{item.price}}</text>
						<text style="">{{item.orgPrice}}</text>
					</view>
					
					<view class="name">
						{{item.title}}
					</view>	
					
				</view>
				
			</view>

	</div>
</template>

<script>
	export default {
		name:"goodslist",
		data(){
			return{
				
			}
		},
		props:{
			goods:Array
		},
		// methods:{
		// 	async getGoods(type,page){
		// 		const res = await this.$myRequest2({
		// 			url:'/home/data',
		// 			data:{
		// 				type,page
		// 			}
		// 		}).then((res)=>{
		// 			console.log('!!!!!!!!!!!!!')
		// 			console.log(res)
		// 			this.goods = res.data.data.list
		// 			console.log(this.goods[0].show)
		// 		})
		// 	}
		// },
		// onLoad() {
		// 	this.getGoods('sell','1');
		// }
	}
</script>

<style lang="scss">
	.goods_list{
		padding: 0 15rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		.goods_item{
			background-color: #FFFFFF;
			width:360rpx;
			text-align: center;
			// margin: 0 auto;
			image{
			width: 90%;
			height: 200px;
			}
			.price{
				color: $base-color;
				font-size: 30rpx;
				text:nth-child(2){
					color: #item;
					font-size: 25rpx;
					text-decoration: line-through;
					padding-left: 7rpx;
				}
			}
			.name{
				font-size: 30rpx;
				padding-top:10rpx;
				padding-bottom: 15rpx;
				//  line-height: 40rpx;
			}
		}
	}

</style>
